Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an incompatible/discouraged clause to mod dependency #386

Merged
merged 7 commits into from
Dec 16, 2023

Conversation

Matyrobbrt
Copy link
Member

@Matyrobbrt Matyrobbrt commented Dec 14, 2023

Depends on neoforged/FancyModLoader#51
More information can be found in that PR.

@Matyrobbrt Matyrobbrt added enhancement New (or improvement to existing) feature or request breaking change Breaks binary compatibility labels Dec 14, 2023
@Matyrobbrt Matyrobbrt changed the title Add an incompatible/conflicting clause to mod dependency Add an incompatible/discouraged clause to mod dependency Dec 14, 2023
@KnightMiner
Copy link
Contributor

Can you give an example of the syntax (I assume in mods.toml) to declare such an incompatibly?

@Matyrobbrt
Copy link
Member Author

The mandatory field is replaced by type=optional/required:

 [[dependencies.somemod]]
   modId="othermod"
   versionRange="[1,)"
-  mandatory=false
+  type="optional"

As for the incompatibility declaration:

[[dependencies.neotests]]
type="discouraged" # can be "incompatible"
modId="client_command_test"
versionRange="[1.4.3,)"
reason="We conflict because of reasons"

The version range can be omitted which will declare an incompatibility with all versions of the mod.

@Minecraftschurli
Copy link
Contributor

eh I'm not really sure if I like the name discouraged

@Matyrobbrt
Copy link
Member Author

The name is descriptive, it's quite literally what the feature does. It shows a screen discouraging the use of the mod. We've gone through different names and found this pair the best possible name, that also isn't extremely generic like type="warn" or type="error".
(also, the SPI PR with that naming has already been merged, right now FML is waiting)

@Matyrobbrt Matyrobbrt marked this pull request as ready for review December 16, 2023 19:52
Copy link
Contributor

@Minecraftschurli Minecraftschurli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dewit

@Matyrobbrt Matyrobbrt merged commit 8786a13 into neoforged:1.20.x Dec 16, 2023
3 checks passed
@Matyrobbrt Matyrobbrt deleted the breaks-clause branch December 16, 2023 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Breaks binary compatibility enhancement New (or improvement to existing) feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants